#ifndef INTERFACE_IHM
#define INTERFACE_IHM

#include <QString>
#include <QDir>
#include <QHash>
#include <QMessageBox>
#include "qbddmanager.h"
#include "qlistline.h"
#include "expfile.h"
#include "qnewplpfile.h"
#include "bomfile.h"
#include "qequivalentlistfile.h"
#include "qlogger.h"
#include "qfilecachedmemory.h"
#include "qalgosearch.h"
#include "reportfile.h"
#include "bomfile.h"

class Interface
{
public:
  Interface(QString bdd,ReportFile*);
  ~Interface(void);


  void analyseFile(const QString& filename);
  void checkCurrent();

  QList<QBDDItem*> search(const QString& designator, const QList<QStringList>& terms,const quint32& maxTerms); 

  QList<QListLine*> getErrors() const { return m_listLines; }
  QList<QListLine*> getErrors(QString id) const;

  void addEquivalence(const QStringList&);
  void addPlp(const QStringList&);
  ReportFile* reportFile() const { return m_report; }
  void replace(const QList<quint32>& lines,const QStringList& field,const QStringList& values);
  void generateBOM();
private:

  ExpFile* m_file;
  QNewPLPFile* m_newPLPFile;
  BOMFile* m_BOM;
  QEquivalentListFile* m_equivalenceFile;
  QList<QErrorLine*> m_errorLines;
  QList<QListLine*> m_listLines;
  QHash<QString,QAlgoSearch*> m_algos;
  ReportFile* m_report;
};

#endif
